﻿package game.objects {
	
	import flash.display.MovieClip;
	import flash.events.Event;
	
	
	public class Rec extends MovieClip {
		var i:int;
		var ox:int = 600;
		var oy:int = 580;
		
		public function Rec() {
			this.x = ox;
			this.y = oy;
			this.visible = false;
		}
		public function setLoction(loc:Number):void {
			i = 40;
			this.y = loc;
			this.addEventListener(Event.ENTER_FRAME, handle);
		}
		public function handle(e:Event):void {
			i--
			if (i < 0)
			{
				this.removeEventListener(Event.ENTER_FRAME, handle);
				this.y = oy;
			}
		}
	}
	
}
